import { Get, Model, Post } from "@xuekl/cli-core/annotate";
import { EmptyOut, GetRoutersOut, GetUserInfoOut } from "./interface";
import R from "@xuekl/cli-core/r";

@Model('')
export default class CommonService {

    @Get('/getRouters')
    getRouters(res) {
        return new R<GetRoutersOut>(res.code, res).result()
    }

    @Get('/getInfo')
    getUserInfo(res) {
        return new R<GetUserInfoOut>(res.code, res).result()
    }

    getList() { }
}

@Model('/xkl', false)
export class LocalService {
    @Post('/saveApiConfig')
    saveApiConfig(res) {
        return new R<EmptyOut>(res.code, res).result()
    }
}